<!doctype html>
    <html lang="zh-CN" >
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .container {
            height: 500px;
            background: yellow;
            display: grid;
            padding: 20px;
            /*grid-template-columns: 100px 100px 100px;*/
            grid-template-columns:repeat(3,100px);
            /*grid-template-rows:100px 100px 100px;*/
            grid-template-rows: repeat(3,100px);
            justify-content:center;
            align-content:center;
            gap: 10px;
        }
        .item {
            /*width: 100px;*/
            height: 100px;
            border-radius: 5px;
            text-align: center;
            line-height: 100px;
            background: orange;
            box-shadow:inset 2px 5px 10px rgba(0,0,0,.15);
            color: #fff;

        }
    </style>
</head>
<body>

<div class="container">
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
    <div class="item">4</div>
    <div class="item">5</div>
    <div class="item">6</div>
    <div class="item">7</div>
    <div class="item">8</div>
    <div class="item">9</div>
</div>

</body>
</html>